using System;
using Sinacor.Servico.Bovespa.Cliente.Service.DataContract.Response;
using Sinacor.Servico.Bovespa.Cliente.BusinessEntity;

namespace Sinacor.Servico.Bovespa.Cliente.Service.ServiceImplementation.Translator
{
    public static class TranslateBetweenNumeroFaxResponseAndNumeroFax
    {
        public static DataContract.Response.NumeroFaxResponse TranslateNumeroFaxToNumeroFaxResponse(BusinessEntity.NumeroFax from)
        {

            if (from == null) return null;

            DataContract.Response.NumeroFaxResponse to = new DataContract.Response.NumeroFaxResponse();
            to.DDD = from.DDD;
            to.Numero = from.Numero;
            return to;
        }

        public static BusinessEntity.NumeroFax TranslateNumeroFaxResponseToNumeroFax(DataContract.Response.NumeroFaxResponse from)
        {

            if (from == null) return null;

            BusinessEntity.NumeroFax to = new BusinessEntity.NumeroFax();
            to.DDD = from.DDD;
            to.Numero = from.Numero;
            return to;
        }
    }
}

